import requests as rq
sess = rq.session()

def isLogin():
    # 利用收藏判断是否登录成功
    body = sess.get("https://www.ftchinese.com/users/favstorylist")
    if "item-inner" not in body.text:
        print("没有登录！")
    else:
        print("登录成功！")


isLogin()
sess.post("https://www.ftchinese.com/users/login",
        data={"username":"XXX@qq.com","password":"asdfgh","savme":"1"})
isLogin()

